import { ChangeDetectionStrategy, Component } from '@angular/core';
import { MessageboxService } from '@iux/live';

@Component({
  templateUrl: './basic.component.html',
  changeDetection: ChangeDetectionStrategy.OnPush,
})
export class BasicComponent {
  constructor(private messageBox: MessageboxService) {}

  info(): void {
    this.messageBox.info({ lvContent: 'This is a info dialog.', lvModalKey: 'myModal' });
  }

  success(): void {
    this.messageBox.success({ lvContent: 'This is a success dialog.', lvModalKey: 'myModal' });
  }

  error(): void {
    this.messageBox.error({ lvContent: 'This is a error dialog.', lvModalKey: 'myModal' });
  }

  warning(): void {
    this.messageBox.warning({ lvContent: 'This is a warning dialog.', lvModalKey: 'myModal' });
  }

  danger(): void {
    this.messageBox.danger({ lvContent: 'This is a danger dialog.', lvModalKey: 'myModal' });
  }
}
